home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3774 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  976 b 

  1. Path: airdmhor.gen.nz!not-for-mail
  2. From: gumboot@airdmhor.gen.nz (Simon Hosie)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What does the -O option do???!!!
  5. Date: 31 Jan 1996 15:58:34 +1300
  6. Organization: Airdmhor
  7. Message-ID: <4emlsq$odt@airdmhor.gen.nz>
  8. References: <4ehger$cj9@mark.ucdavis.edu>
  9. NNTP-Posting-Host: localhost.gen.nz
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Ricardo E Espinoza-Ibarra:
  13.  
  14. > Does anyone know what the -O option in gcc C compiler does?  I have tried
  15. > to compile a program in two different ways: 1) cc -o first first.c, and it
  16. > worksfine; 2) cc -o first first.c -O, and it runs faster than the other one. 
  17. > I checked to see if it had changed the program code in anyway, and it
  18. > hadn't. This option stands for "optimizer", but I want to know how the heck
  19. > it optimizes the program!  
  20.  
  21.   Perhaps if the second time you ran it you used "cc -o second first.c -O"
  22. and then "cmp first second" rather than using "cc -o first fisrt.c -O" and
  23. then "cmp first first"
  24.